<?php

namespace app\admin\validate;

use W7\Validate\Validate;

class SystemUploadCate extends Validate
{
    protected $rule =   [
        'title'                 => 'required',
        'dir_name'              => 'required',
        'sort'                  => 'required',
    ];

    protected $message  =   [
        'title.required'        => '请输入分类名称',
        'dir_name.required'     => '请输入目录名称',
        'sort.required'         => '请输入分类排序',
    ];

    protected $scene = [
        'add'               =>  ['title', 'dir_name', 'sort'],
        'edit'              =>  ['title', 'sort'],
    ];
}
